package com.example.springaopdemo.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@Aspect
public class TimeRecordAspect {
    @Pointcut("execution(* com.example.springaopdemo.controller.*.*(..))")
    public void pt(){};

    @Before("pt()")
    public void dobefore(){
        log.info("执行before");
    }

    @After("pt()")
    public void doAfter(){
        log.info("执行After");
    }
}
